package com.lovo.po;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Component;

import java.io.Serializable;
import java.util.List;


@Data
@Component
@TableName("t_user")
@NoArgsConstructor
public class User implements Serializable {
    @TableId(value = "user_id",type = IdType.AUTO)
    private Integer userId;
    private String userName;
    private String userPwd;

    @TableField(exist = false)
    private List<Role> roleList;

    @TableField(exist = false)
    @JsonSerialize
    private List<Permission> permissionList;


}
